<template>
	<view class="content">
		<view class="list" v-for="(item, index) in list" :key="index" >
			<view class="title">{{item.title}}</view>
			<view class="ct">时间:{{item.ct}}</view>
			<view class="text">{{item.text}}</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				list:[],
				page:1
			}
		},methods:{
			initData(page){
				this.baseRequest({url:'lifeService/joke/'+page,method:'get'}).then(res => {
					uni.hideLoading();
					let rData = res.data;
					for (var i = 0; i < rData.length; i++) {
						this.list.push(rData[i]);
					}
				}, error => {})
			}
		},onShow() {
			this.initData(this.page);
		},onReachBottom() {
			this.page++;
			this.initData(this.page);
		}
	}
</script>

<style lang="scss">
	.list{
		background-color: #fff;
		margin: 20rpx;
		border-radius: 20rpx;
		font-size: 35rpx;
		padding: 30rpx;
		.ct{
			margin: 20rpx 0;
			color: #808080;
			font-size: 30rpx;
		}
		.title{
			font-size: 40rpx;
			font-weight: 800;
		}
	}
</style>
